from hjl_spider.manage.base import ManageBase
from hjl_spider.download.HTTP import HttpRequest


class CrawlManage(ManageBase):

    def __init__(self, spider, **kwargs):
        self.spider = spider

    def gets(self) -> HttpRequest:
        '''
        拿取数据
        :return: HttpRequest
        '''
        req = self.url_queue.get()

        return req

    def is_nose(self):
        return self.url_queue.empty()  # TRUE
